The present invention relates to a semiconductor integrated circuit device and relates to a technique effectively applied to a microcontroller provided for a system such as a vehicle and controlling the system.
A microprocessor (hereinbelow, also called a microcomputer) is assembled in a system such as a home electric appliance, an AV device, a cellular phone, a vehicle, or an industrial machine together with a memory which stores a program for specifying the operation of the microprocessor and controls the operation of the system. In the case of a vehicle as the system, parts such as a microcomputer for controlling the operation of the system are requested to have high reliability since there is the possibility that a failure in the parts causes an accident of the vehicle. It is also requested to prevent the vehicle from entering a dangerous state in the case where a failure occurs in the parts. The vehicle is provided with not only the memory and the microcomputer but also a sensor, an actuator, and the like as parts for controlling the vehicle. The microcomputer is requested to diagnose not only the presence or absence of a failure in the parts but also a failure in the microcomputer itself.
As a technique of diagnosing a failure in a microcomputer itself, non-patent literature 1 discloses a technique of making a microcomputer perform duplicated operations, making two microcomputers execute the same process, and always comparing results.
Non-patent literature 2 discloses a technique capable of making two microcomputers switch and execute parallel operation and duplication operation. In the non-patent literature 2, when a microcomputer fetches a special instruction (switch instruction), the microcomputer stops the operation and enters a standby state for switching a mode. When two microcomputers enter the standby state, each of the microcomputers starts operation in a new mode. As modes for starting, there are a performance mode and a safety mode. In the performance mode, each of the microcomputers performs the parallel operation, so that the performance improves. On the other hand, in the safety mode, the two microcomputers perform the duplication operations. By comparing results of the operations, a failure diagnosis is performed.
Patent literature 1 discloses a redundant multithread architecture in which results of store instructions executed in two threads are compared.
Patent literature 2 discloses a multithreading system in which a program is executed in two threads and, when contents match, the contents are written in a common memory.